Each hint track contains a track reference atom ( 'tref' ) that contains a child atom of type 'hint' which holds the track ID of the track being hinted. A diagram of a hint track reference atom is shown below.
To find a hinted track from its hint track, walk the hint track atom until you find an atom of type 'tref' . Walk the 'tref' atom until you find a child atom of type 'hint' . This will normally be the first child atom. The child atom's type ( 'hint' ) will be followed immediately by the track ID of the track being hinted. The track ID is a 32-bit integer.
Track references can be one-to-many, so there could theoretically be a list of track IDs, which you would detect by examining the 'hint' atom's size. The hinter provided by Apple currently creates a track reference with a single track ID.
QuickTime functions that work with track references are designed to deal with lists of track IDs, so they expect an index parameter to determine which item on the list you are interested in. Pass in 0 as the index parameter to get the first item if you use a function such as GetTrackReference to obtain the media track ID.
Each track contains a track header atom ( 'tkhd' ) that contains the track's ID. To find the track whose ID is referenced by a hint track, walk the track atoms of the movie until you find the one whose track header atom contains the referenced track ID.
Currently, only one hint track is created for each streamed track, but the hint track structure allows multiple hint tracks to reference the same track. Once you have determined which track belongs to each hint track, you should check for multiple hint tracks pointing to the same track. If there are duplicates, use the hint track best optimized for your network.
| Previous | Chapter Contents | Chapter Top | Next |